<?

include "../config/constants.php";

if( $_GET[_test] ){
    $_POST[query] = "select * from `contentsmetadata_db`.`tblContent`";
	$_POST[_3pid] = "snsd";
	$_POST[_chid] = "18";
}

if( !$_POST[query] ) {
    echo "ERROR";
    exit;
}


$req = new HttpRequest(SELECT_URL, HttpRequest::METH_POST);
$req->addPostFields(array('query' => stripslashes($_POST[query])));
$req->addPostFields(array('_3pid' => $_POST[_3pid]));
$req->addPostFields(array('_chid' => $_POST[_chid]));
echo $req->send()->getBody();


?>

